const { DataTypes } = require('sequelize');
const sequelize = require('../init/sequelize');

const EmployeeAttendance = sequelize.define('EmployeeAttendance', {
    employee_id: {
        type: DataTypes.INTEGER,
        allowNull: false,
        primaryKey: true
    },
    isAttendance: {
        type: DataTypes.INTEGER,
        allowNull: true
    },
    year: {
        type: DataTypes.INTEGER,
        allowNull: true
    },
    month: {
        type: DataTypes.INTEGER,
        allowNull: true
    },
    day: {
        type: DataTypes.INTEGER,
        allowNull: true
    }
}, {
    tableName: 'employeeattendance', // 指定表名
    timestamps: false // 不自动生成 createdAt 和 updatedAt 字段
});

module.exports = EmployeeAttendance;